<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // ES6定义类
    // {key:value} -> 对象
    // {表达式} -> 代码块
    // {} -> 类的结构
    class Person {
    }
    var p1 = new Person()
    var p2 = new Person()
    console.log(p1, p2)

    // 另外一种定义方法: 表达式写法(了解, 少用)
    var Student = class {

    }
    var foo = function () {

    }

    var stu1 = new Student()
    console.log(stu1)
  </script>
</body>

</html>